<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function changeNum(num1, num2) {
        let num3
        num3 = num1
        num1 = num2
        num2 = num3
        const arr = [num1, num2]
        return arr
      }
      let change = changeNum(1, 2)
      document.write(change)
    </script>
  </body>
</html>
